Miniscript Template: 2
  Title: 5 Key Time Layered Multisig
  Created: 2023-09-11

Name of Template

5 Key Degrading Multisig

Goal to be achieved by template

Expanding upon the concept of a 3 key timed multisig, a 5 key timed multisig allows for multiple timelocks to be introduced for additional flexibility.

A timelock can be employed to allow a native 3 of 5 multisig to become 2 of 5, and eventually 1 of 5 for disaster recovery. This can be employed by using a miniscript `tresh()` with seven conditions:

3 Conditions to be satisfied by:

1. Key 1
2. Key 2
3. Key 3
4. Key 4
5. Key 5
6. First timelock (either relative or absolute)
7. Second timelock (either relative or absolute)

Timelock Values Note

Suggested Relative Block Height Timelocks:

Suggested Relative Epoch Timmelocks:

Below is a reference diagram on how the 5 Key Time Layered Multisig operates across time:

Example Miniscript Output Descriptor

1. 5 Key Time Lock Multisig - Relative Blockheight Timelock

   wsh(thresh(3,pk(XPUB1),s:pk(XPUB2),s:pk(XPUB3),s:pk(XPUB4),s:pk(XPUB5),snu:older(100),snu:older(200)))

Reference Testnet Transaction

2. 5 Key Time Lock Multisig - Absolute Blockheight Timelock

   wsh(thresh(3,pk(XPUB1),s:pk(XPUB2),s:pk(XPUB3),s:pk(XPUB4),s:pk(XPUB5),snu:after(1694563200),snu:after(1694563200)))

Reference Testnet Transaction

3. 5 Key Time Lock Multisig - Absolute Epochtime Timelock

   wsh(thresh(3,pk(XPUB1),s:pk(XPUB2),s:pk(XPUB3),s:pk(XPUB4),s:pk(XPUB5),snu:after(1694563200),snu:after(1694476800)))

Reference Testnet Transaction

4. 5 Key Time Lock Multisig - Relative Epochtime Timelock

   wsh(thresh(3,pk(XPUB1),s:pk(XPUB2),s:pk(XPUB3),s:pk(XPUB4),s:pk(XPUB5),snu:older(4194400),snu:older(4194500)))

Reference Testnet Transaction

(To Add Taproot descriptors once Minitapscript is merged into Core)